package de.ingo.app.mensa.v0_2.activities;

import de.ingo.app.mensa.v0_2.activities.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class MainMenu extends Activity {
	
	final String PAKET = "de.ingo.app.mensa.v0_2.activities";
	final String infoTAG = "MENSA APP MAIN MENU";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.v(infoTAG, "The Main Menu starts here...onCreate()");
		
		requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                WindowManager.LayoutParams.FLAG_FULLSCREEN);
		
		setContentView(R.layout.main_menu);
		
		Button buttonSpeiseplan = (Button)findViewById(R.id.buttonSpeiseplan);
		Button buttonEinstellung = (Button)findViewById(R.id.buttonPrefs);
		Button buttonHelp = (Button)findViewById(R.id.buttonHelp);
		
		buttonSpeiseplan.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent i = new Intent();
                i.setClassName(PAKET,
                               PAKET + ".Speiseplan");
                startActivity(i);				
			}
		});
		
		buttonEinstellung.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent i = new Intent();
                i.setClassName(PAKET,
                               PAKET + ".Preferences");
                startActivity(i);
			}
		});

		buttonHelp.setOnClickListener(new OnClickListener() {
	
			@Override
			public void onClick(View v) {
				Intent i = new Intent();
				i.setClassName(PAKET,
                               PAKET + ".Help");
				startActivity(i);		
			}
		});

	}
}
